package com.tsmti.task.entity;

import com.tsmti.core.common.entity.AbstractEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @Package：com.tsmti.task.entity
 * @Class：ScheduleJob
 * @Description： TODO
 * @Author：zcw
 * @Date：Created in 2018/5/15 22:23
 * @Company:
 * @Version：
 * @Modified By:
 */
@Entity
@Table(name = "pims_schedule_job")
@DynamicUpdate
@DynamicInsert
@SuppressWarnings("serial")
public class ScheduleJob extends AbstractEntity<String> {
    /** cron表达式 */
    private String cronExpression;
    /** 任务调用的方法名 */
    private String methodName;
    /** 任务是否有状态 */
    private String isConcurrent;
    /** 任务描述 */
    private String description;
    /** 任务主键 */

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "id", nullable = false, length = 32, scale = 0)
    private String id;
    /** 任务执行时调用哪个类的方法 包名+类名 */
    private String beanClass;
    /** 任务状态 */
    private String jobStatus;
    /** 任务分组 */
    private String jobGroup;
    /** Spring bean */
    private String springBean;
    /** 任务名 */
    private String jobName;

    /**
     * 获取 cronExpression
     *
     * @return: String cron表达式
     */
    public String getCronExpression() {
        return this.cronExpression;
    }

    /**
     * 设置 cronExpression
     *
     * @param: cronExpression
     *             cron表达式
     */
    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    /**
     * 获取 methodName
     *
     * @return: String 任务调用的方法名
     */
    public String getMethodName() {
        return this.methodName;
    }

    /**
     * 设置 methodName
     *
     * @param: methodName
     *             任务调用的方法名
     */
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    /**
     * 获取 isConcurrent
     *
     * @return: String 任务是否有状态
     */
    public String getIsConcurrent() {
        return this.isConcurrent;
    }

    /**
     * 设置 isConcurrent
     *
     * @param: isConcurrent
     *             任务是否有状态
     */
    public void setIsConcurrent(String isConcurrent) {
        this.isConcurrent = isConcurrent;
    }

    /**
     * 获取 description
     *
     * @return: String 任务描述
     */
    public String getDescription() {
        return this.description;
    }

    /**
     * 设置 description
     *
     * @param: description
     *             任务描述
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * 获取 id
     *
     * @return: String 任务主键
     */
    @Override
    public String getId() {
        return this.id;
    }

    /**
     * 设置 id
     *
     * @param: id
     *             任务主键
     */
    @Override
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取 beanClass
     *
     * @return: String 任务执行时调用哪个类的方法 包名+类名
     */
    public String getBeanClass() {
        return this.beanClass;
    }

    /**
     * 设置 beanClass
     *
     * @param: beanClass
     *             任务执行时调用哪个类的方法 包名+类名
     */
    public void setBeanClass(String beanClass) {
        this.beanClass = beanClass;
    }

    /**
     * 获取 jobStatus
     *
     * @return: String 任务状态
     */
    public String getJobStatus() {
        return this.jobStatus;
    }

    /**
     * 设置 jobStatus
     *
     * @param: jobStatus
     *             任务状态
     */
    public void setJobStatus(String jobStatus) {
        this.jobStatus = jobStatus;
    }

    /**
     * 获取 jobGroup
     *
     * @return: String 任务分组
     */
    public String getJobGroup() {
        return this.jobGroup;
    }

    /**
     * 设置 jobGroup
     *
     * @param: jobGroup
     *             任务分组
     */
    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }


    /**
     * 获取 springBean
     *
     * @return: String Spring bean
     */
    public String getSpringBean() {
        return this.springBean;
    }

    /**
     * 设置 springBean
     *
     * @param: springBean
     *             Spring bean
     */
    public void setSpringBean(String springBean) {
        this.springBean = springBean;
    }

    /**
     * 获取 jobName
     *
     * @return: String 任务名
     */
    public String getJobName() {
        return this.jobName;
    }

    /**
     * 设置 jobName
     *
     * @param: jobName
     *             任务名
     */
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }


}
